From f6656783078c6a4d0c2397a24acd3774403ab42f Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 30 Nov 2006 17:34:48 +0000 Subject: [PATCH] [LINUX] Properly trigger XenbusStateClosed in blkfront In some situations, like when error happens in block attach for a guest in dom0, backend send us XenbusStateClosing notification. However, as frontend were never properly initialized, it fails to change its own state to XenbusStateClosed, leaving the system in a dead-end state. Signed-off-by: Glauber de Oliveira Costa --- linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c index 95cff46ff9..6b7100a1bc 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -359,7 +359,7 @@ static void blkfront_closing(struct xenbus_device *dev) DPRINTK("blkfront_closing: %s removed\n", dev->nodename); if (info->rq == NULL) - return; + goto out; spin_lock_irqsave(&blkif_io_lock, flags); /* No more blkif_request(). */ @@ -373,6 +373,7 @@ static void blkfront_closing(struct xenbus_device *dev) xlvbd_del(info); + out: xenbus_frontend_closed(dev); } -- 2.30.2